package com.ruoyi.core.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * client-product-user对象 client_product_user
 *
 * @author ruoyi
 * @date 2020-09-28
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class ClientProductUser {

    /**
     * 产品用户id
     */
    private Long id;

    /**
     * 产品用户名
     */
    @Excel(name = "账号")
    private String username;

    /**
     * 产品id
     */
//    @Excel(name = "产品id")
    private Long productId;


    private ResourceStatus status;

    /**
     * $column.columnComment
     */
    //    @Excel(name = "产品用户密码盐")
    private Long salt;

    /**
     * $column.columnComment
     */
    @Excel(name = "密码")
    private String password;

    /**
     * $column.columnComment
     */
    @Excel(name = "Cookie")
    private String cookie;

    /**
     * 在线用户数
     */
    @Excel(name = "在线使用人数")
    private Long onlineUser;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    private String code;

    private Integer available;

    private String backUpCookie;

    private String url;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("username", getUsername())
                                                                        .append("productId", getProductId()).append("salt", getSalt())
                                                                        .append("password", getPassword()).append("cookie", getCookie())
                                                                        .append("onlineUser", getOnlineUser()).append("createTime", getCreateTime())
                                                                        .append("updateTime", getUpdateTime()).toString();
    }
}
